#include<iostream>

class Rectangle
{

public:
    Rectangle(double width,double height);
    double area();
    double perimeter();
    void display();
private:
    double width;
    double height;

};

Rectangle::Rectangle(double width,double height)
{
    this->width = width;
    this->height = height;
}

double Rectangle::area()
{
    return this->width * this->height;
}

double Rectangle::perimeter()
{
    return (this->width + this->height) * 2;
}

void Rectangle::display()
{
    std::cout<<"矩形的宽度是："<<this->width<<std::endl;
    std::cout<<"矩形的高度是："<<this->height<<std::endl;
    std::cout<<"矩形的面积是："<<this->area()<<std::endl;
    std::cout<<"矩形的周长是："<<this->perimeter()<<std::endl;
    std::cout<<std::endl;
}


int main()
{

    Rectangle a (2.3,3.7);
    a.display();

    return 0;
}